"""
URL configuration for day13 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
# from django.contrib import admin
from django.urls import path
from www.views import account, level, price, plus, customer, v1, v2, v3
from www.views.user import info,yang

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('login/', account.login, name="login"),
    path('logout/', account.logout, name="logout"),
    path('sms/login/', account.sms_login, name="sms_login"),
    path('send/sms/', account.send_sms, name="send_sms"),
    path('home/', account.home, name="home"),

    # 客户相关
    path('info/list/', info.info_list, name='info_list'),
    path('yang/list/', yang.yang_list, name='yang_list'),
    path('yang/add/', yang.yang_add, name='yang_add'),
    path('yang/cancel/<int:pk>/', yang.yang_cancel, name='yang_cancel'),
    # 管理员相关

    path('user/', account.user, name="user"),
    path('add/user/', account.add_user, name="add_user"),
    path('edit/user/<int:uid>/', account.edit_user, name="edit_user"),
    path('multi/import/', account.multi_import, name="multi_import"),

    path('level/list/', level.level_list, name="level_list"),
    path('level/add/', level.level_add, name="level_add"),
    path('level/edit/<int:id>/', level.level_edit, name="level_edit"),
    path('level/delete/<int:id>/', level.level_delete, name="level_delete"),

    path('price/list/', price.price_list, name="price_list"),
    path('price/add/', price.price_add, name="price_add"),
    path('price/edit/<int:id>/', price.price_edit, name="price_edit"),
    path('price/delete/<int:id>/', price.price_delete, name="price_delete"),

    # 增加封装
    path('price3/', plus.Price3.urls()),
    path('level3/', plus.Level3.urls()),

    path('price4/', plus.Price4.urls()),
    path('level4/', plus.Level4.urls()),

    path('customer/list/', customer.customer_list, name='customer_list'),
    path('customer/add/', customer.customer_add, name='customer_add'),
    path('customer/edit/<int:pk>/', customer.customer_edit, name='customer_edit'),
    path('customer/delete/<int:pk>/', customer.customer_delete, name='customer_delete'),
    path('customer/reset/<int:pk>/', customer.customer_reset, name='customer_reset'),

    path('customer4/', plus.Customer4.urls()),

    path('v1/demo/', v1.demo, name="v1_demo"),
    path('v2/demo/', v2.demo, name="v2_demo"),

    path('v3/', v3.V3.urls()),
    # path('depart/', v3.Depart.urls()),
    # path('info/', v3.Info.urls()),

]

# import django.contrib.messages.storage.session.SessionStorage
